<template>
    <div>
        <div class="line">
        </div>
        <div class="title">
     <img class="mp-title-img" src="http://img1.qunarzz.com/piao/fusion/1711/89/ebc329f16c55bb02.png"/>猜你喜欢
    </div>
    <ul>
      <router-link 
      tag="li"
      class="item border-bottom"  
      v-for="item of list" 
      :key="item.id" 
      :to="'/detail/'+item.id">
                <img class="item-img" :src='item.imgUrl'/>
            <div class="item-info">
                <p class="item-title">{{item.title}}</p>
                <p class="item-desc">{{item.desc}}</p>
               <div>
                    <p class="item-price">{{item.price}}</p>
               <button class="item-button">查看详情</button>
               </div>
                   
            </div>
      
      </router-link>
    </ul>
    </div>
</template>
<script>
export default {
  name: "HomeRecommend",
  props: {
    list: Array
  }
};
</script>
<style lang="stylus" scoped>
@import '~styles/mixins.styl';

.line {
  height: 10px;
  background: #EBEBEB;
  margin-top: 10px;
}

.title {
  margin-top: 10px;
  line-height: 40px;
  padding-left: 10px;
  font-size: 20px;
}

.mp-title-img {
  width: 5%;
  height: 5%;
}

.item {
  display: flex;
  overflow: hidden;
  height: 105px;
}

.item-img {
  width: 100px;
  height: 100px;
  padding: 5px;
}

.item-info {
  flex: 1;
  padding: 5px;
  min-width: 0;
}

.item-title {
  line-height: 26px;
  font-size: 16px;
  ellipsis();
}

.item-desc {
  line-height: 20px;
  color: #bbbbbb;
}

.item-price {
  float: left;
  line-height: 35px;
  color: #ff9300;
  font-size: 20px;
}

.item-button {
  background: #ff9300;
  margin-top: 5px;
  padding: 10px;
  line-height: 5px;
  border-radius: 3px;
  color: #ffffff;
  float: right;
}
</style>
